package com.howtoplay.Controller;

import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping(value = "/test")
@CrossOrigin
public class TestController {
    @RequestMapping(value = "/test1",method = RequestMethod.GET)
    public Object test1(@RequestParam Map<String, String> map){
        System.out.println("---------------1--------------");
        String name = map.get("name");
        return name;
    }


    @RequestMapping(value = "/test2",method = RequestMethod.POST)
    public Object test2(@RequestParam Map<String, String> map){
        System.out.println("---------------2--------------");
        String name = map.get("name");
        System.out.println(name);
        return name;
    }
}
